<?php

namespace addons\vip\listener;

use addons\shopro\model\User;
use addons\vip\model\Order;

class RechargeBalance
{
    public function run(Order $order)
    {
        if ($order->paytype != 'system') {
            User::money($order->amount, $order->user_id, 'vip', 13, '开通会员赠送', [
                'order_id' => $order->id,
                'order_sn' => $order->orderid,
            ]);
        }
    }
}